package com.wc.alorithm_blue_bridge_history.littlewhite.Q231227.Q10010;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2023/12/27 20:27
 * <p>
 * https://www.lanqiao.cn/problems/10010/learning/?contest_id=157
 * @description
 */
public class Main {
    static long ans = 0;
    static int mod = 998244353;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        for (int i = 1; i <= 9; i++) {
            int re = m - i;
            cal(re, n - 1);
        }
        System.out.println(ans);
    }

    public static void cal(int re, int n) {
        if (re == 0) {
            ans = (ans + 1) % mod;
            return;
        }
        if (re < 0) {
            return;
        }
        if (n == 0 || n * 9 < re) {
            return;
        }
        for (int i = 0; i <= 9; i++) {
            cal(re - i, n - 1);
        }
    }
}
